package com.atguigu.common.exception;


public enum BizCodeEnum {

    /**
     * 10:系统异常
     * 11：商品异常
     * 15：用户异常
     */
    UNKNOWN_EXCEPTION(10000, "系统未知异常"),
    VAILD_EXCEPTION(10001, "参数校验失败"),
    SMS_CODE_EXCEPTION(10002, "短信频率过高，请稍后尝试"),
    SMS_PHONE_EXCEPTION(10003, "手机号码不正确"),
    PRODUCT_UP_EXCEPTION(11000, "商品上架异常"),
    USERNAME_EXIST_EXCEPTION(15001,"用户名已存在"),
    MOBILE_EXIST_EXCEPTION(15002,"手机号码已存在"),
    USERNAME_NOT_EXIST_EXCEPTION(15003,"用户名已存在"),
    PASSWORD_ERROR_EXCEPTION(15004,"账号密码不正确");
    private int code;
    private String msg;

    BizCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
